<template>
	<view class="user-space-userinfo">
		<view class="user-space-userinfo-item">
			<view>账号信息</view>
			<view>糗龄： {{getRegLong}}</view>
			<view>糗百ID： {{userinfo.id}}</view>
		</view>
		<view class="user-space-userinfo-item">
			<view>个人信息</view>
			<view>星座： {{getHoroscope}}</view>
			<view>职业： {{userinfo.job}}</view>
			<view>故乡： {{userinfo.hometown}}</view>
			<view>情感： {{userinfo.qg}}</view>
		</view>
	</view>
</template>

<script>
	import time from '../../common/time.js';
	export default {
		props: {
			userinfo: Object
		},
		data() {
			return {
				regtime: this.userinfo.regtime,
				birthday: this.userinfo.birthday
			}
		},
		computed: {
			getRegLong(){
				return time.gettime.getDiff(this.regtime);
			},
			getHoroscope(){
				return time.gettime.getHoroscope(this.birthday);
			}
		}
	}
</script>

<style scoped>
	.user-space-userinfo{
		padding: 0 30upx;
	}
	.user-space-userinfo-item{
		padding: 20upx 0;
		border-bottom: 1upx solid #EEEEEE;
	}
	.user-space-userinfo-item>view{
		color: #AAAAAA;
	}
	.user-space-userinfo-item>view:first-child{
		color: #333333;
		font-size: 35upx;
		padding: 15upx 0;
	}
</style>
